package join.etc;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class JoinBean {

    private String orderId;
    private String userId;
    private String userName;
    private int userAge;
    private String userOuxiang;
    private String tableName;

    public void set(String orderId, String userId, String userName, int userAge, String userOuxiang, String tableName){
        this.orderId = orderId;
        this.userId = userId;
        this.userName = userName;
        this.userAge = userAge;
        this.userOuxiang = userOuxiang;
        this.tableName = tableName;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getUserAge() {
        return userAge;
    }

    public void setUserAge(int userAge) {
        this.userAge = userAge;
    }

    public String getUserOux() {
        return userOuxiang;
    }

    public void setUserOuxiang(String userOuxiang) {
        this.userOuxiang = userOuxiang;
    }



    @Override
    public String toString() {
        return this.orderId + ","+this.userId +","+this.userAge +","+this.userName + ","+this.userOuxiang;
    }

//序列化
    public void readFields(DataInput in) throws IOException {
        this.orderId = in.readUTF();
        this.userId = in.readUTF();
        this.userName = in.readUTF();
        this.userAge = in.readInt();
        this.userOuxiang = in.readUTF();
        this.tableName = in.readUTF();
    }
//反序列化
public void write(DataOutput out) throws IOException {
    out.writeUTF(this.orderId);
    out.writeUTF(this.userId);
    out.writeUTF(this.userName);
    out.writeInt(this.userAge);
    out.writeUTF(this.userOuxiang);
    out.writeUTF(this.tableName);

}
}

